@import "../common/var";
@import "../common/css3-mixins";

.upload-box {
  margin: -4px;
  &.upload-drag-hover {
    border: 2px dashed $borderColor;
    border-radius: $borderRadius;
  }
  @include clearfixboth();
  input[type="file"] {
    display: none;
  }
  .item-image {
    float: left;
    padding: 4px;
  }
  .add-upload {
    border: $borderWidth solid $borderColor;
    border-radius: $borderRadius;
    padding: 23px 0 28px 0;
    cursor: pointer;
    .upload-img {
      text-align: center;
      margin-bottom: 5px;
    }
    .add-text {
      font-size: 13px;
      line-height: 14px;
      color: $textGrayColor;
      text-align: center;
    }
  }
  .upload-img-box {
    position: relative;
    cursor: pointer;
    &:hover {
      .file-bar {
        height: 30px;
      }
    }
  }
  .upload-image {
    display: block;
    border-radius: $borderRadius;
  }
  .file-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0;
    padding: 0 12px;
    opacity: 0.6;
    background: none repeat scroll 0 0 #000000;
    @include transition(height 0.3s);
    overflow: hidden;
    .file-name {
      float: left;
      font-size: 13px;
      max-width: 120px;
      height: 30px;
      line-height: 30px;
      color: $white;
      @include ellipsis();
    }
    .file-del {
      float: right;
      margin-top: 7px;
      cursor: pointer;
    }
  }
  .desc-input {
    display: block;
    height: 36px;
    line-height: 36px;
    border: $borderWidth solid $borderColor;
    border-radius: $borderRadius;
    margin-top: 8px;
    padding-left: 13px;
    font-size: 13px;
    color: $textColor;
  }
}